package com.czh.convert;

import com.czh.pojo.User;
import com.czh.vo.UserVO;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author chenzhihua
 * @Date 2024/7/30
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, builder = @Builder(disableBuilder = true))
public interface UserConvert {
    UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);

    @Mappings({})
    UserVO convertDO2VO(User user);


    @Mappings({})
    List<UserVO> convertDOList2VOList(List<User> userList);

}
